#ifndef WF_DRAWLINEHORVERT_H
#define WF_DRAWLINEHORVERT_H

#include "pf_previewactioninterface.h"
#include "pf_line.h"
#include "gui_export.h"

/**
 * This action class can handle user events to draw 
 * horizontal/vertical lines from a given startpoint
 * to an endpoint closest to a second given point.
 * OBSOLETE
 *
 */
class GUI_EXPORT WF_DrawLineHorVert : public PF_PreviewActionInterface {
	Q_OBJECT
public:
    /**
     * Action States.
     */
    enum Status {
        SetStartpoint,      /**< Setting the 1st point.  */
        SetEndpoint       /**< Setting the 2nd point. */
    };

public:
    WF_DrawLineHorVert(PF_Container& container,
                             PF_GraphicView& graphicView);
    ~WF_DrawLineHorVert();
	
	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

    void reset();

    virtual void init(int status=0);
    virtual void trigger();
    virtual void mouseMoveEvent(PF_MouseEvent* e);
    virtual void mouseReleaseEvent(PF_MouseEvent* e);
    virtual void updateMouseButtonHints();
    virtual void updateMouseCursor();
    virtual void updateToolBar();

protected:
    /**
     * Line data.
     */
    PF_LineAttribute data;
    /**
     * 2 points
     */
    PF_Vector p1;
    PF_Vector p2;
};

#endif
